<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="templates/common.xhtml">
	<ui:define name="pageHeader">
	    Detail Restaurant
	</ui:define>
	<ui:define name="body">
	<h:form>
	
 	<h:dataTable id="idTableHoraires" border="1" value="#{horaireMBean.listeHoraires}" var="h">
	          <h:column>
	              <f:facet name="header"><f:verbatim>id</f:verbatim></f:facet>
	              <h:commandLink value="#{h.id}" action="#{horaireMBean.doSelection}" >
	                 <f:setPropertyActionListener target="#{horaireMBean.idSelHoraire}"  value="#{h.id}"
	                 	valueChangeListener="#{horaireMBean.onHoraireChange}"
	                  	immediate="true">/>
	              </h:commandLink>
	         </h:column>
	         <h:column>
	              <f:facet name="jour"><f:verbatim>jour</f:verbatim></f:facet>
	              <h:outputText value="#{h.jour}" />
	         </h:column>
	         <h:column>
	              <f:facet name="deb"><f:verbatim>de</f:verbatim></f:facet>
	              <h:outputText value="#{h.heureDebut}" />
	         </h:column>
    	     <h:column>
	              <f:facet name="fin"><f:verbatim>à</f:verbatim></f:facet>
	              <h:outputText value="#{h.heureFin}" />
	         </h:column>
	  </h:dataTable>
	  <br/>  <br/>  <br/>
	  
	 id : <h:outputText value ="#{horaireMBean.horaire.id}"/>  <br/> 

	 
	 type :  <h:selectOneListbox value="#{horaireMBean.horaire.typeHoraire}">  
	 			<f:selectItems  value="#{horaireMBean.horaire.typesHoraire}" var="t" 
	                        itemLabel="#{t.libelle}" itemValue="#{t.id}"/>
	 		</h:selectOneListbox><br/>
	    
	 jour : <h:selectOneListbox value="#{horaireMBean.horaire.jour}">
	 					<f:selectItem itemvalue="0" itemlabel="Dimanche"/>
	 					<f:selectItem itemvalue="1" itemlabel="Lundi"/>
	 					<f:selectItem itemvalue="2" itemlabel="Mardi"/>
	 					<f:selectItem itemvalue="3" itemlabel="Mercredi"/>
	 					<f:selectItem itemvalue="4" itemlabel="Jeudi"/>
	 					<f:selectItem itemvalue="5" itemlabel="Vendredi"/>
	 					<f:selectItem itemvalue="6" itemlabel="Samedi"/>
	 </h:selectOneListbox><br/>
	 de : <h:inputText value ="#{horaireMBean.horaire.id}"/>  <br/>
	 à : <h:inputText value ="#{horaireMBean.horaire.id}"/>  <br/>

	 <br/>  <br/>  <br/>
	 <h:commandButton value="nouveau"  action="#{{horaireMBean.doNouveau}" />
	 <h:commandButton value="save"  action="#{{horaireMBean.doSauve}" />
	 <h:commandButton value="supprime"  action="#{horaireMBean.doSupprime}" />
	<br/>  <br/>  <br/>
	</h:form>
	
	</ui:define>
	
</ui:composition>
</html>